<%@page import="model.User" %>
<%@ page import="java.util.Calendar" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%Calendar now = Calendar.getInstance();%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; UTF-8">

    <link rel="stylesheet" type="text/css"
          href="<%=request.getContextPath()%>/assets/css/bootstrap.css"/>
    <link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/assets/css/Site.css"/>
    <link rel="stylesheet" type="text/css"
          href="<%=request.getContextPath()%>/assets/css/animation.css"/>
    <link rel="stylesheet" type="text/css"
          href="<%=request.getContextPath()%>/assets/css/bootstrap.min.css"/>
    <link rel="stylesheet" type="text/css"
          href="<%=request.getContextPath()%>/assets/css/bootstrap-theme.css"/>
    <link rel="stylesheet" type="text/css"
          href="<%=request.getContextPath()%>/assets/css/bootstrap-theme.min.css"/>
    <script src="<%=request.getContextPath()%>/assets/js/jquery-1.10.2.js"></script>
    <script src="<%=request.getContextPath()%>/assets/js/jquery-1.10.2.min.js"></script>
    <!--    <script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
        <script src="http://code.jquery.com/jquery-migrate-1.2.1.min.js"></script>-->
    <script type="text/javascript" src="<%=request.getContextPath()%>/assets/js/bootstrap.min.js"></script>
    <title>Bienvenue</title>
</head>
<%
    User myUser = (User) request.getSession().getAttribute("user");
    //  request.getSession().invalidate();
%>
<body>

<nav class="navbar navbar-default" role="navigation">
    <div class="navbar j navbar-inverse navbar-fixed-top" role="navigation">
        <div class="container">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <span class="icon-bar"></span> <span class="icon-bar"></span> <span
                    class="icon-bar"></span>
                <a class="navbar-brand" href="<%=request.getContextPath()%>" lang="fr">Adventure
                    Sports</a>
            </div>
            <div class="navbar-collapse collapse">
                <ul class="nav navbar-nav">
                    <li><a href="<%=request.getContextPath()%>"><span class="glyphicon glyphicon-home">&nbsp;</span>Accueil
                    </a></li>
                    <li><a href="#">À propos de</a></li>
                    <li><a href="<%=request.getContextPath()%>/Site/Contact/contact.jsp"><span
                            class="glyphicon glyphicon-info-sign">&nbsp;</span>Contact</a></li>
                    <li class="dropdown"><a href="#" class="dropdown-toggle"
                                            data-toggle="dropdown">Activité <b class="caret"></b></a>
                        <ul class="dropdown-menu">
                            <li><a href="#"><span class="glyphicon glyphicon-eye-open">&nbsp;</span>Consulter</a></li>
                        </ul>
                    </li>
                    <li class="dropdown"><a href="#" class="dropdown-toggle"
                                            data-toggle="dropdown">Stage <b class="caret"></b></a>
                        <ul class="dropdown-menu">
                            <li><a href="<%=request.getContextPath()%>/StageManagerServlet?id=0"><span
                                    class="glyphicon glyphicon-search">&nbsp;</span>Rechercher</a></li>
                            <li class="divider"></li>
                            <li><a href="<%=request.getContextPath()%>/StageManagerServlet?nouveaute=0"><span
                                    class="glyphicon glyphicon-flash">&nbsp;</span>Nouveautées</a></li>
                            <li class="divider"></li>
                            <li><a href="<%=request.getContextPath()%>/StageManagerServlet?promo=0"><span
                                    class="glyphicon glyphicon-exclamation-sign">&nbsp;</span>Promo
                                (Last minute)</a></li>
                        </ul>
                    </li>

                </ul>

                <ul class="nav navbar-nav navbar-right">
                    <li><a href="<%=request.getContextPath()%>/Account/signin.jsp"><span
                            class="glyphicon glyphicon-pencil">&nbsp;</span>S'inscrire</a>
                    </li>
                    <% if (session.getAttribute("user") == null) { %>
                    <li><a href="<%=request.getContextPath()%>/Account/login.jsp"><span
                            class="glyphicon glyphicon-log-in">&nbsp;</span>Se connecter</a></li>
                            <% }  else { %>
                    <li><a href="<%= request.getContextPath()%>/CustomerManagerServlet?action=logout"><span
                            class="glyphicon glyphicon-log-out">&nbsp;</span>Se déconnecter</a>
                        <% }%>
                    </li>
                </ul>
            </div>
        </div>
    </div>
</nav>
<form class="form-horizontal">
   <div>
     <h2 class="h2 text-danger"><marquee behavior="alternate" scrollamount="10" scrolldelay="0">Bienvenue sur AdventureSports</marquee></h2>
       </div>
    <div class="container body-content">
        <div class="jumbotron">
            <h1 class="h1 animation" style="text-decoration: underline;">
                Bienvenue!!!!!!!!!!!! <%
                if (session.getAttribute("user") != null) out.print(String.format(myUser.getLogin())); %>

            </h1>
        </div>
        <div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
            <!-- Indicators (bulles) -->
            <ol class="carousel-indicators">
                <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
                <li data-target="#carousel-example-generic" data-slide-to="1"></li>
                <li data-target="#carousel-example-generic" data-slide-to="2"></li>
                <li data-target="#carousel-example-generic" data-slide-to="3"></li>
                <li data-target="#carousel-example-generic" data-slide-to="4"></li>
            </ol>

            <!--Images et sous titres images-->
            <div class="carousel-inner">
                <div class="active item" style="background: #333; text-align: center; height: 640px !important;">
                    <img src="<%=request.getContextPath()%>/assets/images/vtt.jpg" alt="error">

                    <div class="carousel-caption">
                        <h1>vtt</h1>
                    </div>
                </div>
                <div class="item" style="background: #333; text-align: center; height: 640px !important;">
                    <img src="<%=request.getContextPath()%>/assets/images/kayak.jpg" alt="error">

                    <div class="carousel-caption">
                        <h1>kayak</h1>
                    </div>
                </div>
                <div class="item" style="background: #333; text-align: center; height: 640px !important;">
                    <img src="<%=request.getContextPath()%>/assets/images/tennis.jpg" alt="error">

                    <div class="carousel-caption">
                        <h1>tennis</h1>
                    </div>
                </div>
                <div class="item" style="background: #333; text-align: center; height: 640px !important;">
                    <img src="<%=request.getContextPath()%>/assets/images/golf.jpg" alt="error">

                    <div class="carousel-caption">
                        <h1>golf</h1>
                    </div>
                </div>
                <div class="item" style="background: #333; text-align: center; height: 640px !important;">
                    <img src="<%=request.getContextPath()%>/assets/images/surf.jpg" alt="error">

                    <div class="carousel-caption">
                        <h1>surf</h1>
                    </div>
                </div>
                AdventureSports
            </div>

            <!-- Controls (pour les flêches) -->
            <a class="left carousel-control" href="#carousel-example-generic" data-slide="prev">
                <span class="glyphicon glyphicon-chevron-left"></span>
            </a>
            <a class="right carousel-control" href="#carousel-example-generic" data-slide="next">
                <span class="glyphicon glyphicon-chevron-right"></span>
            </a>
        </div>
    </div>
    </div>
    <hr/>
    <footer class="fixed-bottom">
        <table style="width: 100%;">
            <tr>
                <td valign="middle" style="text-align: left">
                <td valign="bottom"
                    style="text-decoration: underline; text-align: center;">
                    Copyright <% out.print(now.get(Calendar.YEAR));%>
                    Adventure Sports &copy; v0.1.0 by <span style="color: red;">Le Groupe Rouge</span>
                </td>
                <td valign="middle" style="text-align: right"></td>
            </tr>
        </table>
    </footer>
    <hr>
</form>
</body>
</html>
<script>
    $('.carousel').carousel({
        interval: 2000
    });
</script>